/*基金-基金基础页面 path: '/fundbase'*/
<template>
  <div class="fund-base common-fun-trade">
    <header-top :option="headerOption"></header-top>
    <div class="base">
      <div class="title">
        <img class="img_title" src="~assets/images/trade/jijin@2x.png" alt="">
        <h1 class="text_title">基金基础篇</h1>
      </div>
      <ul class="menu_list menu_base">
        <li class="item_menu" v-for="(item,index) in baseData" :key="'base_'+index" @click.stop.prevent="go(item)">
          <span class="text_menu">{{item.text}}</span>
          <i class="iconfont icon-xiangyou xiangyou"></i>
        </li>
      </ul>
    </div>
    <div class="glossary">
      <div class="title">
        <img class="img_title" src="~assets/images/trade/mingci1@2x.png" alt="">
        <h1 class="text_title">名词解释篇</h1>
      </div>
      <ul class="menu_list menu_glossary">
        <li class="item_menu" v-for="(item,index) in glossaryData" :key="'glossary_'+index" @click.stop.prevent="go(item)">
          <span class="text_menu">{{item.text}}</span>
          <i class="iconfont icon-xiangyou xiangyou"></i>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
  import HeaderTop from 'components/HeaderTop'
  import Constant from 'common/constant'

  export default {
    data () {
      return {
        headerOption: {
          title: '基金基础',
          leftBtn: Constant.leftBtn.BACK,
          operations: []
        },
        baseData: [
          {
            text: '什么是基金',
            textIndex: 1.1
          },
          {
            text: '基金交易时间',
            textIndex: 1.2
          },
          {
            text: '基金分类方式',
            textIndex: 1.3
          },
          {
            text: '常见基金分类',
            textIndex: 1.4
          },
          {
            text: '证券投资基金与股票、债券的区别与联系',
            textIndex: 1.5
          }
        ],
        glossaryData: [
          {
            text: '基金组织类术语',
            textIndex: 2.1
          },
          {
            text: '基金交易类术语',
            textIndex: 2.2
          },
          {
            text: '基金费用类术语',
            textIndex: 2.3
          },
          {
            text: '基金信息披露类术语',
            textIndex: 2.4
          },
          {
            text: '基金分配类术语',
            textIndex: 2.5
          },
          {
            text: '基金风险类术语',
            textIndex: 2.6
          }
        ]
      }
    },
    components: {
      HeaderTop
    },
    methods:{
      go (item) {
        this.$router.push({path: '/fundbasedetail',query: {title: item.text, textIndex: item.textIndex}});
      }
    }
  }
</script>

<style scoped>
  * {
    margin: 0;
    padding: 0;
  }
  .fund-base {
    position: absolute;
    left: 0;
    right: 0;
    top: 44px;
    bottom: 0;
    background-color: #e8eaef;
  }
  .base {
    height: 46%;
    position: relative;
  }
  .glossary {
    height: 54%;
    position: relative;
  }
  .title {
    width: 100%;
    /*height: 86px;*/
    height: 66px;
    position: relative;
  }
  .img_title {
    display: block;
    width: 41px;
    height: 55px;
    position: absolute;
    left: 89px;
    /*top: 18px;*/
    top: 5px;
  }
  .glossary .img_title {
    width: 34px;
    left: 101px;
  }
  .text_title {
    display: block;
    width: 50%;
    height: 24px;
    position: absolute;
    left: 138px;
    /*top: 32px;*/
    top: 21px;
    line-height: 24px;
    font-size: 24px;
    color: #3f78e1;
  }

  .menu_list {
    position: absolute;
    left: 0;
    right: 0;
    /*top: 86px;*/
    top: 66px;
    bottom: 0;
  }
  .menu_base .item_menu {
    height: 20%;
  }
  .menu_glossary .item_menu {
    height: 16.66%;
  }
  .item_menu {
    border-bottom: 1px #e7e7e7 solid;
    box-sizing: border-box;
    background-color: #fff;
    position: relative;
  }
  .item_menu:last-child {
    border-bottom: none;
  }
  .text_menu {
    display: block;
    width: 80%;
    height: 14px;
    position: absolute;
    left: 5%;
    top: 0;
    bottom: 0;
    margin: auto 0;
    line-height: 14px;
    font-size: 14px;
    color: #4e4e4e;
  }
  .xiangyou {
    display: block;
    width: 16px;
    height: 16px;
    position: absolute;
    right: 5%;
    top: 0;
    bottom: 0;
    margin: auto 0;
  }
  .xiangyou::before {
    display: block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
  }
</style>
